﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Doo.Scripts;
using System.ComponentModel;

namespace Doo.Controls
{
    public class DooContentPlaceHolder : System.Web.UI.WebControls.ContentPlaceHolder, IUseScriptObject
    {
        public string ScriptObjectID
        {
            get;
            set;
        }

        private Controls.ScriptObject _sobject;
        [EditorBrowsable(EditorBrowsableState.Never)]
        [Browsable(false)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public Controls.ScriptObject ScriptObject
        {
            get { return _sobject ?? (string.IsNullOrEmpty(ScriptObjectID) ? null : FindControl(ScriptObjectID) as Controls.ScriptObject); }
            set { _sobject = value; }
        }
    }
}
